#pragma once
#include "stdafx.h"

#ifdef PLUGINICPROCSTEPS_EXPORTS
#define PLUGINICPROCSTEPS_API __declspec(dllexport)
#else
#define PLUGINICPROCSTEPS_API __declspec(dllimport)
#endif

#include <string>
#include "IPluginICProcStepsParam.h"

class PLUGINICPROCSTEPS_API ProcParam 
{
public:
	static ProcParam *CreateProcParam(const char *ParamType, const char *Name, int Index, IPluginICProcStepsParam::Direction dir, const char *Value);
	static ProcParam *CreateProcParam(ProcParam* param);

	virtual ~ProcParam(void);
			//IPluginICProcStepsParam 
	virtual const char *MXSTDMETHOD GetType() = 0;
	virtual bool		MXSTDMETHOD IsValid() = 0;
	virtual IPluginICProcStepsParam::Direction	MXSTDMETHOD GetDirection() { return _dir; }
	virtual const char *MXSTDMETHOD GetName() {  return  _name.c_str(); }   //return value even if it is invalid
	virtual int			MXSTDMETHOD GetIndex() { return _index; }			//return value even if it is invalid, index in the called function's parameter list, NOT position in ProcParams::_Params[pos] 
	virtual const char *MXSTDMETHOD	GetValueStr() { return _valStr.c_str(); }

protected:
	ProcParam();
	ProcParam(const ProcParam* param);
	ProcParam(int Index, const char *Name, IPluginICProcStepsParam::Direction dir);
protected:
	long		_refCnt;
	int			_index;
	bool		_error;
#pragma warning(disable:4251)
	std::string _name;
	std::string _valStr;
#pragma warning(default:4251)
private:
	IPluginICProcStepsParam::Direction _dir;
};

//-------------------------------------------------------------------------------------------------
//			E N D   O F   F I L E
//-------------------------------------------------------------------------------------------------

